package com.lvy.hczn.front.system.domain.business;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lvy.hczn.front.common.core.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 提货单/取货单
 *
 * @author yw
 * @date 2022-03-22 20:05:39
 **/
@Data
@TableName("delivery_order")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "提货单/取货单")
public class DeliveryOrder extends BaseModel<DeliveryOrder> {

    @ApiModelProperty(value = "提货单编号")
    private String deliveryOrderCode;

    @ApiModelProperty(value = "业务类型:1销售配送/2销售退货配送/3发货配送/4拒收配送")
    private Integer serviceType;

    @ApiModelProperty(value = "业务单号:销售单号/销售退货单号/发货单号")
    private String serviceCode;

    @ApiModelProperty(value = "汇总时的所属仓库")
    private String warehouseCode;

    @ApiModelProperty(value = "汇总时的所属仓库下的提货单ID")
    private String sourceId;

    @ApiModelProperty(value = "批次编号")
    private String batchCode;

    @ApiModelProperty(value = "取货采购员id")
    private String purchaserId;

    @ApiModelProperty(value = "供应商id(选择自配时需要用到)")
    private String supplierId;

    @ApiModelProperty(value = "状态（0：取货中；1、入库中，2、已入库；3、已取消）")
    private String status;

    @ApiModelProperty(value = "类型（0：普通取货单，1：补货配送单）")
    private String type;

    @ApiModelProperty(value = "总配送费用（补货配送单不产生配送费用）")
    private BigDecimal distributionCost;

    @ApiModelProperty(value = "配送结算时间")
    private LocalDateTime settlementTime;

    @ApiModelProperty(value = "详情")
    @TableField(exist = false)
    private List<DeliveryOrderDetail> list;
}
